<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../../../common/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<sfa:mainTitle></sfa:mainTitle>
		<%@ include file="../../../common/meta.jsp"%>
		
</head>
	<body id="master">
		<sfa:mainHeader></sfa:mainHeader>
		<div class="main">
		<span class="pageTitle"> 考勤统计(总体) </span>			
			<hr />
			
			<div class="in">
				<form method="get">
					<table width="100%" border="0" cellspacing="0" cellpadding="10"
						class="serch_table">
						<tbody>
							<tr>
								<td class="table_title">
									<span>起始日期</span>
								</td>
								<td>
									<input type="text" id="checktimebegin" name="checktimebegin"
									onfocus="WdatePicker({startDate:'%y-%M-01 00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true})"
									readOnly="true" style="height: 20px; width: 118px;"
									value="${begintime}" />
								</td>
								<td class="table_title">
									<span>结束日期</span>
								</td>
								<td>
									<input type="text" id="checktimeend" name="checktimeend"
									onfocus="WdatePicker({startDate:'%y-%M-01 00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true})"
									readOnly="true" style="height: 20px; width: 118px;"
									value="${endtime}" />
								</td>								
							</tr>
							<tr>
								<td class="table_title">
									<span>考勤类型</span>
								</td>
								<td>	
									<sfa:dic showType="select" kindNo="CHECKITEM"
										code="${checkitem}" def="ALL:全部;" attr="class='selectbox'"
										name="attendanceType" id="attendancetype"></sfa:dic>
								</td>
								<td class="table_title">
									<span>考勤级别</span>
								</td>
								<td>
								<sfa:dic showType="select" kindNo="AGENTLEVELCODE" code="${agentlevel}" def="ALL:全部"
									attr="class='selectbox'" name="agentLevelCode" id="agentLevelCode">
								</sfa:dic>
							</td>
							</tr>	
							<tr>
								<td colspan="4" class="table_btn">
									<input type="submit" class="linkbtn2" value="查询" />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="button" class="linkbtn2" value="重新"
										onclick="location.href='${path}/team/attendance/index/attall';" />
								</td>
							</tr>
						</tbody>
					</table>
				</form>
			</div>
    <div class="in">  
     
				<table width="100%" border="0" cellspacing="0" cellpadding="10"
					class="sortable" id="dtable" style="text-align: center;">
					<thead>
						<tr id="dhtr">
							<th>
								<span>考勤类型</span>
							</th>
							<th width="230px">
								<span>考勤时间段</span>
							</th>
							<th>
								<span>层级</span>
							</th>
							<th>
								<span>迟到</span>
							</th>
							<th>
								<span>请假</span>
							</th>
							<th>
								<span>准时</span>
							</th>
							<%--<td>
								<span>未考勤</span>
							</td>
							--%>
							<th>
								<span>出勤率</span>
							</th>
						</tr>
						</thead>
						<tbody>
						<c:forEach items="${list.resultList}" var="temp">
							<tr class="gray datarow">
								<td>
									<div>
										<sfa:dic showType="value" code="${temp.checkitem}"></sfa:dic>
									</div>
								</td>
								<td>
									<fmt:formatDate value="${temp.checkStartTime}" pattern="yyyy-MM-dd HH:mm"/>
									~
									<fmt:formatDate value="${temp.checkEndTime}" pattern="yyyy-MM-dd HH:mm"/>
								</td>
								<td>
									<div>
										<sfa:dic showType="value" code="AGENTLEVELCODE_${temp.agentLevel}"></sfa:dic>
									</div>
								</td>
								<td>
									<div>
										<a href="${path}/team/attendance/index/detail?
										checksta=CHECKSTATUS_2&checkitem=${temp.checkItem}&level=${temp.agentLevel}
										&starttime=${temp.checkStartTime}&endtime=${temp.checkEndTime}">
											${temp.beLate}
										</a>
									</div>
								</td>
								<td>
									<span>
									<a href="${path}/team/attendance/index/detail?
										checksta=CHECKSTATUS_3&checkitem=${temp.checkItem}&level=${temp.agentLevel}
										&starttime=${temp.checkStartTime}&endtime=${temp.checkEndTime}">
											${temp.leave}
									</a>	
									</span>
								</td>
								<td>
									<span>
										${temp.onTime}
									</span>
								</td>
								<%--<td>
									<span><a href="${path}/team/attendance/index/detail?
										checksta=CHECKSTATUS_4&checkitem=${temp.checkItem}&level=${temp.agentLevel}
										&starttime=${temp.checkStartTime}&endtime=${temp.checkEndTime}">
											${temp.noCheckWork}
									</a></span>
								</td>--%>
								<td>
									<span>
										${temp.attendance}%
									</span>
								</td>
							</tr>
						</c:forEach>
						</tbody>
						<c:if test="${not empty list.multiPage}">
						<tfoot>
						<tr class="tabfooter">
							<td colspan="7" align="right">
								<!--  PAGINATION START  -->
								<div class="pagination">
									${list.multiPage}
								</div>
								<!--  PAGINATION END  -->
							</td>
						</tr>
					</tfoot>
					</c:if>
				</table>
			</div>
			</div>
	<sfa:mainFooter></sfa:mainFooter>
  </body>
</html>
